Developer Documentation
PATH  WebObjects 4.5 Documentation > Getting Started With Direct to Java Client

   

Creating a Corresponding Window

The AboutWebObjectsActions.wod file defines a new task, aboutWebObjects. When the switch component for the aboutWebObjectsAction makes its rule system request, it adds an entry to the rule system's D2WContext specifying the task as aboutWebObjects. In other words, when a user clicks the "About WebObjects" command, the rule system knows that the current task is aboutWebObjects. So, to open the corresponding window, you simply write a custom rule whose condition specifies the task as aboutWebObjects:

  1. Write a custom rule that specifies the following:

    The value, AboutWebObjects, is a D2WComponent that generates the XML for the custom window.

  2. Write the AboutWebObjects D2WComponent

    AboutWebObjects.html

    <DIALOGCONTROLLER disposeIfDeactivated="true"
    label="About WebObjects" reuseMode="AlwaysReuse"
    typeName="aboutWebObjects">
      <STATICICONCONTROLLER canResizeHorizontally="false"
      canResizeVertically="false" iconName="PoweredByWebObjects"/>
     </DIALOGCONTROLLER>

    For this simple example, the corresponding AboutWebObjectsActions.wod is empty.


© 1999 Apple Computer, Inc. – (Draft. Last updated 05 Jan 00)